package sse.ustc.cc.util;

import java.sql.NClob;

import android.view.ScaleGestureDetector.OnScaleGestureListener;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.widget.LinearLayout;


public class MyLinearLayout extends LinearLayout {
	private Context mContext;
	
	//是否拦截
	private boolean isIntercept = false;

	public MyLinearLayout(Context mContext, AttributeSet attrs) {
		super(mContext, attrs);
		this.mContext = mContext;
		// TODO Auto-generated constructor stub
	}

	@Override
	public boolean dispatchTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		return super.dispatchTouchEvent(ev);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		super.onInterceptTouchEvent(ev);
		//如果两个手指，则是双手缩放事件，拦截touch事件， 否则不拦截touch事件，交给子View去处理
		if(ev.getPointerCount() == 2)
			return true;
		else 
			return false;
	}
}
